//
//  ActionListLine.m
//  nova
//
//  Created by user on 11/08/05.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "ActionListLine.h"


@implementation ActionListLine


@synthesize actionName;
@synthesize actionIcon;
@synthesize actionLabel;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
		
		actionIcon = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, 32, 32)];
		
		
		actionLabel = [[UILabel alloc] initWithFrame:CGRectMake(42, 0, 288, 30) ];
		actionLabel.numberOfLines = 1;
		actionLabel.font = [UIFont boldSystemFontOfSize: 15.0];
		actionLabel.textColor = [UIColor blackColor];		
		actionLabel.text = actionName;
		actionLabel.backgroundColor = [UIColor clearColor];
		[self.contentView addSubview:actionIcon ];		
		[self.contentView addSubview:actionLabel ];			

    }
    return self;
}

- (void) setAction{
	actionIcon.image = [UIImage imageNamed:@"actionShadow.png"];//[[UIImageView alloc] initWithImage:];	
}

- (void) setAdd{
	[actionLabel setBounds:CGRectMake(140, 5, 180, 32)];
	actionIcon.image = [UIImage imageNamed:@"addButton.png"];//[[UIImageView alloc] initWithImage:];	
}


- (void) setActionName : (NSString *) name{
	actionName = name;
	actionLabel.text = actionName;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state.
}


- (void)dealloc {
    [super dealloc];
}


@end
